from objectClass import Student
from person import Person
class ChildStudent(Student, Person): # 可以多继承
    def __init__(self, name, age, adress):
        Student.__init__(self, name, age)
        Person.__init__(self, adress) # 需要显式指向调用父类
    def child_say(self) -> None:
        age = super().age # 先找Student 父类，没有就再找Person父类
        print('super().age = ', age)
        super().say_hello('子类中调用父类方法')  # 先找Student 父类，没有就再找Person父类
        print('子类调用父类方法', self.name)
child: ChildStudent = ChildStudent('子类实例',  11,  "234")
child.child_say()
print(child)
child.say_hello('子类调用的say_hello')

child.say_address()
